<?php
class PNAjaxModelArray extends PNObjectExArray {
  function PNAjaxModelArray($init=null, $where='')
  {
    $this->PNObject();

    $this->_objType       = 'innoforum_model';
    $this->_objField      = 'id';
    $this->_objPath       = 'form';

    $this->_init($init, $where);
  }

  function genSort(){
    return " ORDER BY mod_name ASC";
  }

  function genFilter(){
    $brand_id  = FormUtil::getPassedValue ('brand_id', false);

    $wheres = array();

    //filter by selector
    if ($brand_id && intval($brand_id)){
      $wheres[] = "mod_brand_id ='$brand_id'"; 
    }

    return implode(' AND ', $wheres) ;
  }

}